<test>
  <sql>SELECT	*,
		(
			SELECT	et.TerritoryID
			FROM	EmployeeTerritories et
			WHERE	et.EmployeeID = e.EmployeeId
			ORDER	BY et.TerritoryID
		) AS TerritoryID
FROM	Employees e</sql>
  <expectedErrors>
    <expectedError id="OrderByInvalidInSubqueryUnlessTopIsAlsoSpecified" text="The ORDER BY clause is invalid in derived tables, subqueries, and common table expressions, unless TOP is also specified." />
  </expectedErrors>
</test>